<template>
  <div class="home">
    <img alt="Vue logo" src="../assets/logo.png">
    <HelloWorld msg="Welcome to Your Vue.js + TypeScript App"/>
  </div>
</template>

<script lang="ts">
import { defineComponent, ref } from 'vue'
import HelloWorld from '@/components/HelloWorld.vue'
import trackMerge from '@/mixins/trackMarge'

export default defineComponent({
  mixins: [trackMerge],
  name: 'Home',
  components: { HelloWorld },
  setup () {
    const val = ref('23143')
    console.log('home', val.value)
    val.value.indexOf('2') // 类型推断
    return {
      val
    }
  },
  activated () {
    console.log('home-activated', this.val)
  },
  provide: {
    user: '2134123'
  }
})
</script>
